//
//  UIFactory.swift
//  微博项目
//
//  Created by zhaoyinpeng on 16/3/14.
//  Copyright © 2016年 zhaoyinpeng. All rights reserved.
//

import UIKit

class UIFactory {
    
    //.抽象方法
    class func labelFactory(textcolor: UIColor, fontSize: CGFloat, text: String,alignment: NSTextAlignment = .Center) -> UILabel {
        
        let l = UILabel.labelWith(textcolor, fontSize: fontSize, text: text,alignment: alignment)
        return l
    }

    
    // 背景图片 + 图片的按钮的显示样式
    class func buttonWithImage(imageName: String?, backImageName: String?) -> UIButton {
        let btn = UIButton.buttonWithImage(imageName, backImageName: backImageName)
        return btn
        
    }
    
    
    //背景图片 + 文字 样式的按钮
    class func buttonWithtitle(title: String ,backImageName: String? ,textColor: UIColor,fontSize: CGFloat,imageName:String? = nil) -> UIButton {
        let btn = UIButton.buttonWithtitle(title, backImageName: backImageName, textColor: textColor, fontSize: fontSize, imageName: imageName)
        return btn
    }

    
    
    
}
